Functional Reactive Programming with Liveness Guarantees As relations are to set-valued functions, so event sources are to behaviours
نویسنده
چکیده
Functional Reactive Programming (FRP) is an approach to the development of reactive systems which provides a pure functional interface, but which may be implemented as an abstraction of an imperative event-driven layer. FRP systems typically provide a model of behaviours (total time-indexed values, implemented as pull systems) and event sources (partial time-indexed values, implemented as push systems). In this paper, we investigate a type system for event-driven FRP programs which provide liveness guarantees, that is every input event is guaranteed to generate an output event. We show that FRP can be implemented on top of a model of sets and relations, and that the isomorphism between event sources and behaviours corresponds to the isomorphism between relations and set-valued functions. We then implement sets and relations using a model of continuations using the usual double-negation CPS transform. The implementation of behaviours as pull systems based on futures, and of event sources as push systems based on the observer pattern, thus arises from first principles. We also discuss a Java implementation of the FRP model.
منابع مشابه
Fuzzy number-valued fuzzy relation
It is well known fact that binary relations are generalized mathematical functions. Contrary to functions from domain to range, binary relations may assign to each element of domain two or more elements of range. Some basic operations on functions such as the inverse and composition are applicable to binary relations as well. Depending on the domain or range or both are fuzzy value fuzzy set, i...
متن کاملAn interval-valued programming approach to matrix games with payoffs of triangular intuitionistic fuzzy numbers
The purpose of this paper is to develop a methodology for solving a new type of matrix games in which payoffs are expressed with triangular intuitionistic fuzzy numbers (TIFNs). In this methodology, the concept of solutions for matrix games with payoffs of TIFNs is introduced. A pair of auxiliary intuitionistic fuzzy programming models for players are established to determine optimal strategies...
متن کاملA Suggested Approach for Stochastic Interval-Valued Linear Fractional Programming problem
In this paper, we considered a Stochastic Interval-Valued Linear Fractional Programming problem(SIVLFP). In this problem, the coefficients and scalars in the objective function are fractional-interval, and technological coefficients and the quantities on the right side of the constraints were random variables with the specific distribution. Here we changed a Stochastic Interval-Valued Fractiona...
متن کاملCharacterizing Global Minimizers of the Difference of Two Positive Valued Affine Increasing and Co-radiant Functions
Many optimization problems can be reduced to a problem with an increasing and co-radiant objective function by a suitable transformation of variables. Functions, which are increasing and co-radiant, have found many applications in microeconomic analysis. In this paper, the abstract convexity of positive valued affine increasing and co-radiant (ICR) functions are discussed. Moreover, the ...
متن کاملUNCERTAINTY DATA CREATING INTERVAL-VALUED FUZZY RELATION IN DECISION MAKING MODEL WITH GENERAL PREFERENCE STRUCTURE
The paper introduces a new approach to preference structure, where from a weak preference relation derive the following relations:strict preference, indifference and incomparability, which by aggregations and negations are created and examined. We decomposing a preference relation into a strict preference, anindifference, and an incomparability relation.This approach allows one to quantify diff...
متن کامل